public class Course {
    private String courseId;
    private String courseName;
    private String teacher;

    //不带参构造函数


    public Course() {
    this.courseId = "未知课程编号";
    this.courseName = "未知课程名称";
    this.teacher = "未知任课教师";
    }

    //带参构造函数
    public Course(String courseId, String courseName, String teacher) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.teacher = teacher;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public void showinfo(){
        System.out.println("课程编号：" + courseId + "\n课程名称：" + courseName + "\n任课教师：" + teacher);
        System.out.println("-------------------");
    }

}
